#include "Thread.hpp"
#include <unistd.h>
#include <vector>

void Show()
{
    while (true)
    {
        /* code */
        cout << "I am a 封装的线程" << endl;
        sleep(1);
    }
}

int main()
{   
    vector<Thread> threads;
    for(int i = 0; i < 5; i++)
    {
        threads.push_back(Thread(Show));
    }

    for(auto& e : threads)
    {
        e.Run();
    }

    for(auto& t : threads)
    {
        t.Join();
    }
    return 0;
}